package org.xlin.biz.service.table;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.xlin.biz.dao.table.TableDao;

/**
 * 
 * 桌位管理逻辑处理类
 * @author xl
 *
 */
@Service
public class TableService {
	
	@Resource
	TableDao tableDao;
	
	/**
	 * 分页查询桌位列表
	 * @param pageable
	 * @param condition
	 * @return
	 */
	public Page<Map<String, ?>> queryRecord4Page(Pageable pageable, Map<String, Object> condition){
		return tableDao.queryRecord4Page(pageable, condition);
	}
	
	/**
	 * 增加桌位
	 * @param condition
	 * @return
	 */
	public void addRecord(Map<String,Object> condition){
		tableDao.addRecord(condition);
	}
	
	/**
	 * 更新桌位
	 * @param condition
	 * @return
	 */
	public int modfiyRecord(Map<String,Object> condition){
		return tableDao.modfiyRecord(condition);
	}
	
	/**
	 * 删除桌位
	 * @param condition
	 * @return
	 */
	public void deleteRecord(Map<String,Object> condition){
		tableDao.deleteRecord(condition);
	}
}
